	@data = ();
    $file_len = 0;
    $i = 0;  
    
		##############################
		####Get All Data##############
		##############################
	$data[0] = 0x10;
	$data[1] = 0x02;
	$i = 2;
	while($i<0x1000) {
		$data[$i ++] = 0xFF;
		#printf "%x ",$data[$i-1]; #DEBUG;
	}
	
    open(EEP,"eeprom.dat") or die $!;
    while (<EEP>) {
    	$data[$i ++] = hex();
    	#printf "%x ",$data[$i-1]; #DEBUG;
    }
    close(EEP);
	$file_len = $i;
	
	open(FLASH, ">flash.dat");
	$i = 0;
	while($i<$file_len) {
		printf FLASH "%02x\n", $data[$i ++];
	}
	close(FLASH);
	
	open(BINFILE, ">flash_bin.bin");
    binmode(BINFILE);
	$i = 0;
	while($i<$file_len) {
		printf BINFILE "%c", $data[$i ++];
	}
	$remain = 16- ($file_len&0x0F);
	if($remain < 16) {
		$i = 0;
		$temp = 0;
		while($i<$remain) {
			printf BINFILE "%c", $temp;
			$i++;
		}
	}
	if((($file_len+$remain) % 4096) == 0) {
		#fill 16 bytes when align with 4K Bytes
		$i = 0;
		$temp = 0;
		while($i<16) {
			printf BINFILE "%c", $temp;
			$i++;
		}
	}
	close(BINFILE);
	